.class public Lcom/openfeint/api/OpenFeintSettings;
.super Ljava/lang/Object;
.source "OpenFeintSettings.java"


# static fields
.field public static final CloudStorageCompressionStrategyDefault:Ljava/lang/String; = "CloudStorageCompressionStrategyDefault"

.field public static final CloudStorageCompressionStrategyLegacyHeaderlessCompression:Ljava/lang/String; = "CloudStorageCompressionStrategyLegacyHeaderlessCompression"

.field public static final CloudStorageCompressionStrategyNoCompression:Ljava/lang/String; = "CloudStorageCompressionStrategyNoCompression"

.field public static final RequestedOrientation:Ljava/lang/String; = "RequestedOrientation"

.field public static final SettingCloudStorageCompressionStrategy:Ljava/lang/String; = "SettingCloudStorageCompressionStrategy"


# instance fields
.field public id:Ljava/lang/String;

.field public key:Ljava/lang/String;

.field public name:Ljava/lang/String;

.field public secret:Ljava/lang/String;

.field public settings:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter "_name"
    .parameter "_key"
    .parameter "_secret"
    .parameter "_id"

    .prologue
    .line 25
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 26
    iput-object p1, p0, Lcom/openfeint/api/OpenFeintSettings;->name:Ljava/lang/String;

    .line 27
    iput-object p2, p0, Lcom/openfeint/api/OpenFeintSettings;->key:Ljava/lang/String;

    .line 28
    iput-object p3, p0, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    .line 29
    iput-object p4, p0, Lcom/openfeint/api/OpenFeintSettings;->id:Ljava/lang/String;

    .line 30
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/openfeint/api/OpenFeintSettings;->settings:Ljava/util/Map;

    .line 31
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V
    .locals 0
    .parameter "_name"
    .parameter "_key"
    .parameter "_secret"
    .parameter "_id"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 43
    .local p5, _settings:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 44
    iput-object p1, p0, Lcom/openfeint/api/OpenFeintSettings;->name:Ljava/lang/String;

    .line 45
    iput-object p2, p0, Lcom/openfeint/api/OpenFeintSettings;->key:Ljava/lang/String;

    .line 46
    iput-object p3, p0, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    .line 47
    iput-object p4, p0, Lcom/openfeint/api/OpenFeintSettings;->id:Ljava/lang/String;

    .line 48
    iput-object p5, p0, Lcom/openfeint/api/OpenFeintSettings;->settings:Ljava/util/Map;

    .line 49
    return-void
.end method


# virtual methods
.method public applyOverrides(Ljava/util/Properties;)V
    .locals 2
    .parameter "settings"

    .prologue
    .line 80
    if-nez p1, :cond_1

    .line 95
    :cond_0
    :goto_0
    return-void

    .line 84
    :cond_1
    const-string v1, "app-id"

    invoke-virtual {p1, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 85
    .local v0, property:Ljava/lang/String;
    if-eqz v0, :cond_2

    iput-object v0, p0, Lcom/openfeint/api/OpenFeintSettings;->id:Ljava/lang/String;

    .line 87
    :cond_2
    const-string v1, "game-name"

    invoke-virtual {p1, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 88
    if-eqz v0, :cond_3

    iput-object v0, p0, Lcom/openfeint/api/OpenFeintSettings;->name:Ljava/lang/String;

    .line 90
    :cond_3
    const-string v1, "app-key"

    invoke-virtual {p1, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 91
    if-eqz v0, :cond_4

    iput-object v0, p0, Lcom/openfeint/api/OpenFeintSettings;->key:Ljava/lang/String;

    .line 93
    :cond_4
    const-string v1, "app-secret"

    invoke-virtual {p1, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 94
    if-eqz v0, :cond_0

    iput-object v0, p0, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    goto :goto_0
.end method

.method public verify()V
    .locals 2

    .prologue
    .line 98
    const/4 v0, 0x0

    .line 100
    .local v0, verificationError:Ljava/lang/String;
    iget-object v1, p0, Lcom/openfeint/api/OpenFeintSettings;->key:Ljava/lang/String;

    if-nez v1, :cond_2

    .line 102
    const v1, 0x7f040001

    invoke-static {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getRString(I)Ljava/lang/String;

    move-result-object v0

    .line 110
    :cond_0
    :goto_0
    if-eqz v0, :cond_1

    .line 111
    const-string v1, "OpenFeintSettings"

    invoke-static {v1, v0}, Lcom/openfeint/internal/OpenFeintInternal;->log(Ljava/lang/String;Ljava/lang/String;)V

    .line 112
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/openfeint/internal/OpenFeintInternal;->displayErrorDialog(Ljava/lang/CharSequence;)V

    .line 114
    :cond_1
    return-void

    .line 103
    :cond_2
    iget-object v1, p0, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    if-nez v1, :cond_3

    .line 104
    const v1, 0x7f040002

    invoke-static {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getRString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 105
    :cond_3
    iget-object v1, p0, Lcom/openfeint/api/OpenFeintSettings;->id:Ljava/lang/String;

    if-nez v1, :cond_4

    .line 106
    const v1, 0x7f040003

    invoke-static {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getRString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 107
    :cond_4
    iget-object v1, p0, Lcom/openfeint/api/OpenFeintSettings;->name:Ljava/lang/String;

    if-nez v1, :cond_0

    .line 108
    const v1, 0x7f040004

    invoke-static {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getRString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method
